
class Parent {
    {
        System.out.println("父类实例代码块");
    }
    static {
        System.out.println("父类静态代码块");
    }
    public Parent() {
        System.out.println("父类构造方法");
    }
}

class Child extends Parent{
    {
        System.out.println("子类实例代码块");
    }
    static {
        System.out.println("子类静态代码块");
    }
    public Child() {
        System.out.println("子类构造方法");
    }
}

public class Inheritance {
    public static void main(String[] args) {
        Child child1= new Child();
        System.out.println("=========");
        Child child2= new Child();
    }
}
